package cn.qin.Actions;

import cn.qin.Models.NEWS;
import cn.qin.Services.newsServices;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

public class pubNewsAction extends ActionSupport {

	NEWS news = new NEWS();

	public NEWS getNews() {
		return news;
	}

	public void setNews(NEWS news) {
		this.news = news;
	}

	public String execute(){
		newsServices newsservice = new newsServices();
		newsservice.saveNews(this.getNews());
		System.out.println("pubNewsAction:public String execute()");
		return Action.SUCCESS;
	}
	public NEWS getModel() {
        return news;
    }

}
